xs_write takes the length of the string being written, not the
path.
Signed-off-by: Steven Hand <steven.hand@cl.cam.ac.uk>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
#include <errno.h>
+#include <string.h>
#include <sys/poll.h>
#include <xc_private.h>
#include <xg_save_restore.h>
if ( xsh == NULL )
return -EIO;
- rc = xs_write(xsh, XBT_NULL, path, "flush-cache", strlen(path));
+ rc = xs_write(xsh, XBT_NULL, path, "flush-cache", strlen("flush-cache"));
xs_daemon_close(xsh);